<template>
  <!-- 2.定义echarts容器 -->
  <div class="echarts" ref="echarts"></div>
</template>
<script>
//1.引入echarts
import * as echarts from "echarts";
export default {
  name: "",
  data() {
    return {};
  },
  mounted() {
    //3.初始化echarts实例
    let lineCharts = echarts.init(this.$refs.echarts);
    //3.配置数据
    lineCharts.setOption({
      xAxis: {
        //隐藏x轴
        show: false,
        type: "category",
      },
      yAxis: {
        //隐藏y轴
        show: false,
      },
      series: [
        {
          type: "bar",
          data: [10, 7, 33, 12, 22,18,44,55],
          color:'cyan'
        },
      ],
      //布局样式
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
    });
  },
};
</script>
<style>
.echarts {
  width: 100%;
  height: 100%;
}
</style>